<?php

class MockData
{
    /**
     * facebook user 信息
     *
     * @return array
     */
    public function getFacebookUser()
    {
        return [
            'token'           => "EAAU62YdTYj4BAJZBMQLXoR5rDeO",
            'refreshToken'    => null,
            'expiresIn'       => 5158246,
            'id'              => "116406832838306",
            'nickname'        => null,
            'name'            => "Lyu Kan",
            'email'           => "352829638@qq.com",
            'avatar'          => "https =>//graph.facebook.com/v3.0/116406832838306/picture?type=normal",
            'user'            => [
                "name"  => "Lyu Kan",
                "email" => "352829638@qq.com",
                "id"    => "116406832838306",
            ],
            "avatar_original" => "https://graph.facebook.com/v3.0/116406832838306/picture?width=1920",
            "profileUrl"      => null
        ];
    }

    /**
     * twitter user 信息
     *
     * @return array
     */
    public function getTwitterUser()
    {
        return [
            'id'              => $user->id ?? '',
            'nickname'        => $user->nickname ?? '',
            'name'            => $user->name ?? '',
            'email'           => $user->email ?? '',
            'avatar'          => $user->avatar ?? '',
            'avatar_original' => $user->avatar_original ?? '',
        ];

    }

    /**
     * linkedin user 信息
     *
     * @return array
     */
    public function getLinkedInUser()
    {
        return [
            "firstName"  => "Alexey",
            "id"         => "cHMbkYfvRd",
            "lastName"   => "Varlamov",
            "pictureUrl" => "https://media.licdn.com/dms/image/C4D03AQFI3guhzzdb7w/profile-displayphoto-shrink_100_100/0?e=1531958400&v=beta&t=BsEWycRjDXGivp1ZLT2GgH53WiP-SPHuju4egEDQkVs",
        ];
    }

    public function getLinkedInUserOriginal()
    {
        return [
            "firstName"      => [
                "localized"       => [
                    "zh_CN" => "阳光"
                ],
                "preferredLocale" => [
                    "country"  => "CN",
                    "language" => "zh",
                ],
            ],
            "lastName"       => [
                "localized"       => [],
                "preferredLocale" => [
                    "country"  => "CN",
                    "language" => "zh",
                ],
            ],
            "profilePicture" => [
                "displayImage"  => "urn:li:digitalmediaAsset:C5103AQGmWcP3c9gRlA",
                "displayImage~" => [
                    "elements" => [
                        0 => [
                            "artifact"            => "urn:li:digitalmediaMediaArtifact:(urn:li:digitalmediaAsset:C5103AQGmWcP3c9gRlA,urn:li:digitalmediaMediaArtifactClass:profile-displayphoto-shrink_100_100)",
                            "authorizationMethod" => "PUBLIC",
                            "data"                => [
                                "com.linkedin.digitalmedia.mediaartifact.StillImage" => [
                                    "storageSize"        => [],
                                    "storageAspectRatio" => [],
                                    "mediaType"          => "image/jpeg",
                                    "rawCodecSpec"       => [],
                                    "displaySize"        => [
                                        "uom"    => "PX",
                                        "width"  => 100.0,
                                        "height" => 100.0,
                                    ],
                                    "displayAspectRatio" => [],
                                ],
                            ],
                            "identifiers"         => [
                                0 => [
                                    "identifier"                 => "https://media.licdn.com/dms/image/C5103AQGmWcP3c9gRlA/profile-displayphoto-shrink_100_100/0?e=1557360000&v=beta&t=_fJwSbCRovFvib5zObDrtcrMpUw755-Pve0TqX0lWho",
                                    "file"                       => "urn:li:digitalmediaFile:(urn:li:digitalmediaAsset:C5103AQGmWcP3c9gRlA,urn:li:digitalmediaMediaArtifactClass:profile-displayphoto-shrink_100_100,0)",
                                    "index"                      => 0,
                                    "mediaType"                  => "image/jpeg",
                                    "identifierType"             => "EXTERNAL_URL",
                                    "identifierExpiresInSeconds" => 1557360000,
                                ]
                            ]
                        ],
                        1 => [],
                        2 => [],
                        3 => [],
                    ],
                    "paging"   => [],
                ]
            ],
            "id"             => "_B66hpaQin",
            "emailAddress"   => "352829638@qq.com",
        ];
    }

    /**
     * google user 信息
     *
     * @return array
     */
    public function getGoogleUser()
    {
        return [
            'id'              => '',
            'nickname'        => '',
            'name'            => '',
            'email'           => '',
            'avatar'          => '',
            'avatar_original' => '',
        ];
    }

    /**
     *
     */
    public function notice()
    {
        /**
         * @see \Laravel\Socialite\Two\AbstractProvider;
         *  AbstractProvider中配置默认读取 config/services.php中对应provider数组，
         *  AbstractProvider中必须引入ConfigTrait,才能动态配置config,
         * @see \SocialiteProviders\Manager\ConfigTrait;
         */
    }
}